using System;
using System.Collections.Generic;
using System.Text;

using NHibernate;
using Zwms.Data.Base;
using System.Runtime.Serialization;

namespace Zwms.Data.BusinessObjects
{
    [DataContract]
    public partial class BaseGoodsCategory : BusinessBase<string>
    {
        #region Declarations

        private string _categoryName = String.Empty;
        private int _categoryLevel = default(Int32);
        private string _paretCode = String.Empty;
        private string _createUserCode = String.Empty;
        private string _createUserName = String.Empty;
        private string _createDate = String.Empty;
        private string _createTime = String.Empty;
        private string _editUserCode = String.Empty;
        private string _editUserName = String.Empty;
        private string _editDate = String.Empty;
        private string _editTime = String.Empty;
        private string _isDeactived = String.Empty;
        private string _remark = String.Empty;



        #endregion

        #region Constructors

        public BaseGoodsCategory() { }

        #endregion

        #region Methods

        public override int GetHashCode()
        {
            System.Text.StringBuilder sb = new System.Text.StringBuilder();

            sb.Append(this.GetType().FullName);
            sb.Append(_categoryName);
            sb.Append(_categoryLevel);
            sb.Append(_paretCode);
            sb.Append(_createUserCode);
            sb.Append(_createUserName);
            sb.Append(_createDate);
            sb.Append(_createTime);
            sb.Append(_editUserCode);
            sb.Append(_editUserName);
            sb.Append(_editDate);
            sb.Append(_editTime);
            sb.Append(_isDeactived);
            sb.Append(_remark);

            return sb.ToString().GetHashCode();
        }

        #endregion

        #region Properties
        [DataMember]
        public virtual string CategoryName
        {
            get { return _categoryName.TrimEnd(); }
            set
            {
                OnCategoryNameChanging();
                _categoryName = value;
                OnCategoryNameChanged();
            }
        }
        partial void OnCategoryNameChanging();
        partial void OnCategoryNameChanged();

        [DataMember]
        public virtual int CategoryLevel
        {
            get { return _categoryLevel; }
            set
            {
                OnCategoryLevelChanging();
                _categoryLevel = value;
                OnCategoryLevelChanged();
            }
        }
        partial void OnCategoryLevelChanging();
        partial void OnCategoryLevelChanged();

        [DataMember]
        public virtual string ParetCode
        {
            get { return _paretCode.TrimEnd(); }
            set
            {
                OnParetCodeChanging();
                _paretCode = value;
                OnParetCodeChanged();
            }
        }
        partial void OnParetCodeChanging();
        partial void OnParetCodeChanged();

        [DataMember]
        public virtual string CreateUserCode
        {
            get { return _createUserCode.TrimEnd(); }
            set
            {
                OnCreateUserCodeChanging();
                _createUserCode = value;
                OnCreateUserCodeChanged();
            }
        }
        partial void OnCreateUserCodeChanging();
        partial void OnCreateUserCodeChanged();

        [DataMember]
        public virtual string CreateUserName
        {
            get { return _createUserName.TrimEnd(); }
            set
            {
                OnCreateUserNameChanging();
                _createUserName = value;
                OnCreateUserNameChanged();
            }
        }
        partial void OnCreateUserNameChanging();
        partial void OnCreateUserNameChanged();

        [DataMember]
        public virtual string CreateDate
        {
            get { return _createDate.TrimEnd(); }
            set
            {
                OnCreateDateChanging();
                _createDate = value;
                OnCreateDateChanged();
            }
        }
        partial void OnCreateDateChanging();
        partial void OnCreateDateChanged();

        [DataMember]
        public virtual string CreateTime
        {
            get { return _createTime.TrimEnd(); }
            set
            {
                OnCreateTimeChanging();
                _createTime = value;
                OnCreateTimeChanged();
            }
        }
        partial void OnCreateTimeChanging();
        partial void OnCreateTimeChanged();

        [DataMember]
        public virtual string EditUserCode
        {
            get { return _editUserCode.TrimEnd(); }
            set
            {
                OnEditUserCodeChanging();
                _editUserCode = value;
                OnEditUserCodeChanged();
            }
        }
        partial void OnEditUserCodeChanging();
        partial void OnEditUserCodeChanged();

        [DataMember]
        public virtual string EditUserName
        {
            get { return _editUserName.TrimEnd(); }
            set
            {
                OnEidtUserNameChanging();
                _editUserName = value;
                OnEidtUserNameChanged();
            }
        }
        partial void OnEidtUserNameChanging();
        partial void OnEidtUserNameChanged();

        [DataMember]
        public virtual string EditDate
        {
            get { return _editDate.TrimEnd(); }
            set
            {
                OnEditDateChanging();
                _editDate = value;
                OnEditDateChanged();
            }
        }
        partial void OnEditDateChanging();
        partial void OnEditDateChanged();

        [DataMember]
        public virtual string EditTime
        {
            get { return _editTime.TrimEnd(); }
            set
            {
                OnEditTimeChanging();
                _editTime = value;
                OnEditTimeChanged();
            }
        }
        partial void OnEditTimeChanging();
        partial void OnEditTimeChanged();

        [DataMember]
        public virtual string IsDeactived
        {
            get { return _isDeactived.TrimEnd(); }
            set
            {
                OnIsDeactivedChanging();
                _isDeactived = value;
                OnIsDeactivedChanged();
            }
        }
        partial void OnIsDeactivedChanging();
        partial void OnIsDeactivedChanged();

        [DataMember]
        public virtual string Remark
        {
            get { return _remark.TrimEnd(); }
            set
            {
                OnRemarkChanging();
                _remark = value;
                OnRemarkChanged();
            }
        }
        partial void OnRemarkChanging();
        partial void OnRemarkChanged();

        #endregion
    }
}